<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  <title>Document</title>
  <style>

  </style>
</head>

<body>

</body>
<script>
  function ajax(data) {
    // console.log(data instanceof FormData);
    if (typeof data === 'string') {
      //说明提交的是查询字符串
      console.log('提交的查询字符串');
    } else if (data instanceof FormData) {
      //说明提交的是FormData对象
      console.log('提交FormData');
    } else if (data instanceof Object) {
      //说明提交的是字面量对象
      console.log('提交的是字面量对象');
    }
  }
</script>

</html>